package com.example.dao;

import com.example.entity.SigninusersInfo;
import com.example.entity.YundongdatasInfo;
import com.example.vo.YundongdatasInfoVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;
import java.util.Map;

@Repository
public interface YundongdatasInfoDao extends Mapper<YundongdatasInfo> {
    List<YundongdatasInfoVo> findByYundongdates(@Param("yundongdates") String yundongdates);
	List<YundongdatasInfoVo> findByYundongdateslist2(@Param("yundongdates") String yundongdates,@Param("username") String username);
        
	//xiugaimimazy
    int checkRepeat(@Param("column") String column, @Param("value") String value, @Param("id") Long id);
    
    Integer count();
	
	@Select("select * from yundongdatas_info where username = #{username}")
    YundongdatasInfo selectByUsername(String username);
	
	@Select("SELECT * FROM yundongdatas_info order by id")
    List<Map<String, Object>> daochuexcel();
	
	@Select("SELECT xxdiquziduanxxxx,count(id) as hsggs FROM yundongdatas_info  group by xxdiquziduanxxxx")
    List<Map<String,String>> findByDiqu();
	
	
	
	@Select("SELECT distinct(yundongmode) as aa,count(id) as bb FROM yundongdatas_info group by yundongmode order by id")
List<Map<String, Object>> yundongdatas_tj_yundongmode();

	
	
    
	
	
	
	//wexixinxzhuaxnyoxng
	
	@Select("select * from yundongdatas_info where username = #{username}")
    List<YundongdatasInfo> findByusername(SigninusersInfo signinusersInfo);
    

}
